package guijavacommander.tasks;

import java.util.List;
import java.util.ArrayList;

/**
 * User: Deady
 * Date: 17.07.2009
 * Time: 11:15:40
 */
public abstract class AbstractFilesTask extends AbstractTask implements FilesTask {
    private List<ProgressListener> listeners = new ArrayList<ProgressListener>();

    public void addSubProgressListener(ProgressListener l) {
        listeners.add(l);
    }

    public void fireSubProgressChanged(int currentProgress) {
        for (ProgressListener l : listeners) {
            l.progressUpdated(currentProgress);
        }
    }

}
